<?php
ini_set('session.gc_maxlifetime', 43200);//设置sesseion过期时间为12小时  wangwx 2015-06-23
ini_set('session.cookie_domain', '.mingyuanyun.com');
ini_set("session.name", "test_myscrm_phpsessid");

$env_file_path = dirname(dirname(dirname(__DIR__))).DIRECTORY_SEPARATOR.'.env';
if(!file_exists($env_file_path)){
    exit('缺少env文件');
}
$env = file_get_contents($env_file_path);
defined('YII_ENV') or define('YII_ENV', trim($env));
defined('YII_DEBUG') or define('YII_DEBUG', true);


require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../../common/config/bootstrap.php');
require(__DIR__ . '/../config/bootstrap.php');

$config = yii\helpers\ArrayHelper::merge(
	require(__DIR__ . '/../../common/config/main.php'),
	require(__DIR__ . '/../../common/config/main-local.php'),
	require(__DIR__ . '/../config/main.php'),
	require(__DIR__ . '/../config/'.YII_ENV.'/main-local.php')
);

$application = new yii\web\Application($config);

$timeRecord = [];
$timeRecord[] = "start appRun\t\t:".microtime();
$application->run();


